package com.powergisol.gis.service.impl;

import com.powergisol.gis.dao.TabDataSettingMapper;
import com.powergisol.gis.dao.TabMarkerColorMapper;
import com.powergisol.gis.dao.TabProjectMapper;
import com.powergisol.gis.entity.TabDataSetting;
import com.powergisol.gis.service.TabMarkerColorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TabMarkerColorServiceImpl implements TabMarkerColorService {
    @Autowired
    TabMarkerColorMapper tabMarkerColorMapper;
    @Autowired
    TabProjectMapper tabProjectMapper;
    @Autowired
    TabDataSettingMapper tabDataSettingMapper;
    @Override
    public List<String> getAllTCType() {
        List<String> tcms = tabMarkerColorMapper.getAllTCType();
        return tcms;
    }

    @Override
    public List<String> getTypeBySet(String serviceId) {
        TabDataSetting byServiceId = tabDataSettingMapper.getByServiceId(Integer.valueOf(serviceId));
        List<String> tcmcs = tabMarkerColorMapper.getOneByUuid(byServiceId.getUuid());
        return tcmcs;
    }
}
